﻿<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Médiathéque - Administration</title>
        <?php include('communs/lienCssAdmin.php'); ?>
        <script type="text/javascript" src="js/dropdown/jquery.js"></script>
    </head>
    <body>
        <div id="conteneurTete">
            <?php include('communs/enTete.php'); ?>
        </div> 
        <?php include('communs/menuAdmin.php'); ?>   
        <div id="conteneurCorps">
        <?php
            if (isset($_GET['msg'])){
                echo $_GET['msg']."<br />\n";
            }
        ?>
		<h2> Ajouter un utilisateur </h2>
        <table>
            <tr><td>Matricule : </td><td><input type='text' name='matricule'></input></td></tr>
            <tr><td>Nom : </td><td><input type='text' name='nom'></input></td></tr>
            <tr><td>Prenom : </td><td><input type='text' name='prenom'></input></td></tr>
            <tr><td>Telephone : </td><td><input type='text' name='telephone'></input></td></tr>
            <tr><td>Courriel : </td><td><input type='text' name='courriel'></input></td></tr>
            <tr><td>Notes : </td><td><input type='text' name='notes'></input></td></tr>
            <tr><td>Admin : </td><td><input type='checkbox' name='mode'></input></td></tr>
            <tr><td>Password : </td><td><input type='text' name='password'></input></td></tr>
            <tr><td><input type='submit'></td></tr>
        </table>
        
        <?php
            require ('php/connexionBaseDeDonnees.php');
            $temp = $bd->query("Select matricule, prenom, nom from client");
            $results = $temp->fetchAll();
		echo "<h2> Supprimer un utilisateur </h2>";
            
            echo "<table rules='rows'>";
            foreach($results as $result){
                echo "<tr class='smallvpad'>";
                echo "<td class='smallpad'>";
                echo $result['matricule'];
                echo "</td><td class='smallpad'>";
                echo $result['prenom']." ".$result['nom'];
                echo "</td><td class='smallpad'>";
                echo "</td><td class='smallpad'>";
                echo "</td><td class='smallpad'>";
                echo "<input type='button' value='Supprimer'>";
                echo "</td>";
            }
            echo "</table>";
        ?>
        <br />
        <br />
		<a href="indexAdmin.php">Retour</a>
        </div>
        <div id="conteneurPied">
            <?php include('communs/piedDePage.php'); ?>   
        </div>
    </body>
</html>
